1. Field of the Invention
This invention relates to computer system data management, and particularly to eXtensible Markup Language (XML) based object-relationship mapping for different object types.
2. Description of Background
Enterprise applications often employ numerous software objects that can benefit from inheritance relationships but must also support persistent data storage for future use (e.g., e-business applications). In developing and modeling relationships between multiple similar objects, the task of creating inheritance relationships between the objects while supporting persistent data storage can result in a number of issues. Although multiple models have been developed to establish relationships between objects with inheritance and data storage schemas, existing models may not provide both rapid data search performance and ease of modification to add new properties and object types. It would be beneficial to develop a method to model relationships between object types that supports extensibility for rapid updates and reconfiguration, while also providing fast data searching performance for the underlying persistent data.
For example, an object type of “employee” can have an inheritance relationship with both a “regular employee” and a “contractor employee” object types, where regular employee and contractor employee object types have additional properties that are not common between them. While this type of inheritance relationship is common, difficulties can arise in determining how to organize the object data structure relationship and the underlying database schema such that the addition of new properties to either object type (e.g., regular employee and/or contractor employee) has a minimal impact on existing object structures and the database schema. One approach is to create an inheritance structure of objects, with different objects for each object type, and employ multiple database tables, with one table per object type. However, this approach is very difficult to customize, as the addition of a new property requires a database schema change, as well as code changes and regeneration to create the changed object type. Moreover, this approach is inefficient for searching, as multiple tables must be traversed and may require a join operation. Multiple tables also consume more database resources. A second approach is to create an inheritance structure of objects, with different objects for each object type, and employ a single database table with columns for all properties in the full inheritance structure. While such an approach may improve search performance over the first approach, adding new properties or object types still creates problems, as the code creating the objects must be changed to regenerate the updates. A third approach is to employ a single object and a vertical database schema. Using this approach may improve the ability to extend and customize the data structure, but it results in poor search performance, as multiple tables must be traversed in a hierarchical manner. Accordingly, there is a need in the art for a method to perform object-relationship mapping for different object types that supports both extensibility and rapid searching of the underlying persistent data.